<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        #banner{
            width: 3.35rem;
            height: 1.435rem;
            margin: 0.97rem auto 0;
            background: #568;
        }
    </style>
</head>
<body>
    <div id="banner"></div>

    <script>
        function adapter(){
            //计算当前窗口对应的 font-size 值
            let fontSize = 100 * document.documentElement.clientWidth / 375;
            //设置根标签
            document.documentElement.style.fontSize = fontSize + 'px';
        }

        window.onresize = adapter;

        adapter();

    </script>

</body>
</html>